<div class="section gf-form-group" ng-mouseenter="editor.setCurrentParam('currentOptions',rule.getTextMapOptions())"
  ng-mouseleave="editor.unsetCurrentParam('currentOptions')">
  <h5 class="section-heading">
    Label/Text Mappings
    <info-popover mode="right-normal">
      <span ng-bind-html="$GF.popover('Select the text object to replace by value', 'TEXTS','fc_subway_example')">
      </span>
    </info-popover>
  </h5>
  <div id="labelsOptionsGeneral">
    <!-- ID INPUT -->
    <div class="gf-form">
      <span class="gf-form-label width-11">Identify by
        <info-popover mode="right-normal">
          <span ng-bind-html="$GF.popover('Select the type of data in field \'What\' ID (uniq) or LABEL', 'TEXTS')">
          </span>
        </info-popover>
      </span>
      <div class="gf-form-select-wrapper">
        <select class="gf-form-input width-10" ng-model="rule.getTextMapOptions().identByProp"
          ng-options="c.value as c.text for c in editor.propTypes" ng-change="editor.onRulesChange()"></select>
      </div>
    </div>
    <!-- METADATA INPUT -->
    <div class="gf-form" ng-show="rule.getTextMapOptions().identByProp === 'metadata'">
      <span class="gf-form-label width-11">Data name
        <info-popover mode="right-normal">
          <span ng-bind-html="$GF.popover('Select a metadata name or a regex', 'TEXTS')">
          </span>
        </info-popover>
      </span>
      <input type="text" style="margin-right: 2px;" placeholder="id or regex of shape" class="gf-form-input width-8"
        ng-model="rule.getTextMapOptions().metadata" title="Enter a metadata name or a regex"
        bs-typeahead="editor.getCellNamesTypeHead" ng-blur="editor.onRulesChange()" data-min-length="0" data-items="100"
        ng-model-onblur data-placement="right" />
    </div>
    <!-- ID Regular expression -->
    <div class="gf-form">
      <gf-form-switch class="gf-form" label="Regular expression" label-class="width-11"
        checked="rule.getTextMapOptions().enableRegEx" on-change="editor.onRulesChange()"
        tooltip="Disable this option if you don't use regular expressions in field 'What' below to improve performance">
      </gf-form-switch>
    </div>
    <!-- Table -->
    <ng-include src="GFPlugin.getPartialPath() + 'rules/labels/labelsTable.html'"> </ng-include>
  </div>
</div>
